﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PBOffice.DAL;
using PBOffice.BLL;

public partial class PersonnelManagementPage_employee : System.Web.UI.Page
{
    UserManager um = new UserManager();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            gvEmployee.DataSource = um.ShowAllUserInfo();     //为数据控件gvEmployee绑定数据源：员工信息
            gvEmployee.DataBind();

        }
    }
    /// <summary>
    /// 添加员工按钮单击事件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        //跳转到添加员工页面
        Response.Redirect("../PersonnelManagementPage/addEmployee.aspx");
    }
    protected void gvEmployee_RowEditing(object sender, GridViewEditEventArgs e)
    {
        //跳转到添加员工页面
        Response.Redirect("../PersonnelManagementPage/addEmployee.aspx");
    }
}